<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>反转世界</title>
</head>

<body>
    <header class="header">
        <h1>{{strData}}</h1>
        <button @click="reve">按钮</button>
    </header>



    <script src="./vue.js"></script>
    <script>
        const app = new Vue({
            el: '.header',
            data: {
                strData: 'Hello,World'
            },
            methods: {
                reve() {
                    this.strData = this.strData.split('').reverse().join('');

                }
            }
        })
    </script>
</body>

</html>